<?php

class association_m_category extends a_base_model_datamapper {

    public function __construct($id=null) {
        $this->table = 'categories_association';
        parent::__construct();

        }

    public function get_child()
    {
        $objChildCat = new category_m_category();
        return  $objChildCat->get_by_id($this->cat_id);
    }

    public function get_parent()
    {
        $objParentCat = new category_m_category();
        return  $objParentCat->get_by_id($this->parent_cat_id);
    }
}
?>